<!-- 电梯使用单位统计 -->
<template>
	<div class="LiftBox">
		<div class="tableBox">
			<vueScroll>
				<el-table :data="tableData" highlight-current-row ref="moviesTable" @row-click="rowClick" @select-all="selectChange"
				 @selection-change="selectChange" style="width: 100%" border header-row-class-name='tableHeader'>
					<el-table-column type="index" class="over" fixed>
					</el-table-column>
					<el-table-column type="selection" min-width="50" fixed>
					</el-table-column>
					<el-table-column label="使用单位">
						<template slot-scope="scope">
							<el-tooltip class="item" effect="dark" :content="scope.row.userName" placement="top">
								<span class="speSpan">{{scope.row.userName}}</span>
							</el-tooltip>
						</template>
					</el-table-column>
					<el-table-column label="电梯总数">
						<template slot-scope="scope">
							<el-tooltip class="item" effect="dark" :content="scope.row.liftCount" placement="top">
								<span class="speSpan">{{scope.row.liftCount}}</span>
							</el-tooltip>
						</template>
					</el-table-column>
					<el-table-column label="物联网接入量">
						<template slot-scope="scope">
							<el-tooltip class="item" effect="dark" :content="scope.row.count" placement="top">
								<span class="speSpan">{{scope.row.count}}</span>
							</el-tooltip>
						</template>
					</el-table-column>
					<el-table-column label="接入比例">
						<template slot-scope="scope">
							<el-tooltip class="item" effect="dark" :content="scope.row.percent" placement="top">
								<span class="speSpan">{{scope.row.percent}}%</span>
							</el-tooltip>
						</template>
					</el-table-column>
				</el-table>
				<!-- 分页器 -->
				<div class="pag">
					<el-pagination :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="page_size" layout="total, sizes, prev, pager, next, jumper"
					 :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange">
					</el-pagination>
				</div>
			</vueScroll>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				page_size: 10,
				total: 10,
				tableData: [{
						userName: '江苏大撒大撒大撒大撒大大',
						liftCount: '1111',
						count: '100',
						percent: '100',
					},
					{
						userName: '江苏大撒大撒大撒大撒大大',
						liftCount: '1111',
						count: '100',
						percent: '100',
					},
					{
						userName: '江苏大撒大撒大撒大撒大大',
						liftCount: '1111',
						count: '100',
						percent: '100',
					}
				]
			}
		},
		methods: {
			//当前页
			handleCurrentChange(page) {
				this.page = page
			},
			//页数
			handleSizeChange(size) {
				this.page_size = size
			},
			//行点击
			rowClick(row) {
				this.$refs.moviesTable.toggleRowSelection(row)
			},
			//点击多选框
			selectChange(res) {

			},
		}
	}
</script>

<style>
</style>
